<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<% String cpath = request.getContextPath(); %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<link href="<%=cpath%>/resources/css/coupon_css.css" rel="stylesheet" type="text/css">
<script type="text/javaScript" language="javascript" >

<%-- function fn_upload(){
	var frm = document.insert;
	
	frm.action="<%=cpath%>/coupon/insert";
	frm.submit();
	
	//alert($("#insert").serialize());
	if(confirm("저장하시겠습니까?")){
	$.ajax({
			  url:'<%=cpath%>/coupon/insert',
			    async:true,
			    dataType:'html',
			    type:'POST',
			    data: $("#insert").serialize(),
			    success: function(data) {
			    	alert("쿠폰등록완료");
			    	location.href="<%=cpath%>/coupon/couponList";
			    },
			    error:function(){
			   		alert("쿠폰등록실패");
			  }
		});
	} 
} --%>





</script>
</head>
<body>

<form id="insert"name="insert" action="<%=cpath%>/coupon/insertProcess"  method="POST" enctype="multipart/form-data">
<table width="600" height="475" align="center" border="0" cellspacing="1" bgcolor="#FFC0CB">
  <!-- <tr>
    <td width="105" bgcolor="ffffff"> 쿠폰번호</td>
    <td width="260" bgcolor="ffffff">
      <div align="left">
        <input type="text" name="coupon_num">
      </div></td>
  </tr> -->
  <tr>
    <td bgcolor="ffffff">쿠폰명</td>
    <td bgcolor="ffffff">
    <div align="left">
      <input type="text" name="coupon_name">
    </div></td>
  </tr>
  <tr>
    <td bgcolor="ffffff">유의사항</td>
    <td bgcolor="ffffff"><div align="left">
      <textarea name="coupon_notice" ></textarea>&nbsp;&nbsp;&nbsp;쿠폰사용시 유의사항을 적어주세요.
    </div></td>
  </tr>
  <tr>
    <td bgcolor="ffffff">시작일</td>
    <td bgcolor="ffffff"><div align="left">
      <input type="text" name="coupon_startdate">&nbsp;&nbsp;&nbsp;YYYY/MM/DD형식으로 등록해주세요
    </div></td>
  </tr>
  <tr>
    <td bgcolor="ffffff">종료일</td>
    <td bgcolor="ffffff"><div align="left">
      <input type="text" name="coupon_enddate" >&nbsp;&nbsp;&nbsp;YYYY/MM/DD형식으로 등록해주세요
    </div></td>
  </tr>
  <tr>
    <td bgcolor="ffffff">상세</td>
    <td bgcolor="ffffff"><div align="left">
      <textarea name="coupon_details"></textarea>&nbsp;&nbsp;&nbsp;쿠폰사용에에 대한 정보를 적어주세요
    </div></td>
  </tr>
  <tr>
    <td bgcolor="ffffff">할인율</td>
    <td bgcolor="ffffff"><div align="left">
      <input type="text" name="coupon_discount">
    </div></td>
  </tr>
  <tr>
    <td bgcolor="ffffff">이미지</td>
    <td bgcolor="ffffff"><div align="left">
      <input type="file" name="file">&nbsp;&nbsp;&nbsp; 이미지를 등록해주세요.
    </div></td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="ffffff">
    		
        <div align="center">
        
		  <input type="submit" value="등록">&nbsp;&nbsp;&nbsp;
          <input type="reset" value="취소">
        </div>    </td>
  </tr>
</table>
</form>
</body>
</html>